package cn.com.zsw.gblog.modules.gblog.service.impl;

import cn.com.zsw.gblog.modules.gblog.mapper.GbSocialMapper;
import cn.com.zsw.gblog.modules.gblog.entity.GbSocialEntity;
import cn.com.zsw.gblog.modules.gblog.service.GbSocialService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (gb_social)表服务实现类
 *
 * @author shiwangzhou
 * @since 2020-06-24 16:50:28
 */
@Service("gbSocialService")
public class GbSocialServiceImpl extends ServiceImpl<GbSocialMapper, GbSocialEntity> implements GbSocialService {
    @Resource
    GbSocialMapper socialMapper;

    /**
     * @Author: shiwangZhou
     * @Description: 获取社交地址列表
     * @Date: 2020-06-24 16:52
     * @Return java.util.List<cn.com.zsw.gblog.modules.gblog.entity.GbFriendSiteEntity>
     * @Param
     */
    @Override
    public List<GbSocialEntity> getSocialList() {
        LambdaQueryWrapper<GbSocialEntity> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(GbSocialEntity::getStatus, 1);
        return socialMapper.selectList(wrapper);

    }
}